﻿namespace DIProject.DataSets
{	partial class Stock
	{	internal void Init()
		{	ShiftInLines.ColumnChanged += new System.Data.DataColumnChangeEventHandler(ShiftInLines_ColumnChanged);
		}

		private void ShiftInLines_ColumnChanged(object sender, System.Data.DataColumnChangeEventArgs e)
		{	ShiftInLinesRow line = (ShiftInLinesRow)e.Row;
			if(e.Column == ShiftInLines.BlockedColumn)
			{	ShiftInPartiesRow party = line.ShiftInPartiesRow;
				party.Blocked = line.Blocked;
			}
			else if(e.Column == ShiftInLines.QnttyColumn)
			{	if(line.Qntty < 0)
					line.Qntty = 0;
				line.RetailSum = line.RetailPrice * line.Qntty;
			}
		}
	}
}
